package com.yehee.chainserver.mapper;

import com.yehee.chainserver.common.entity.UserWallet;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.math.BigDecimal;
import java.util.List;

@Repository

public interface EthWalletMapper extends Mapper<UserWallet> {
    UserWallet selectByAddress(@Param("address") String address);
    UserWallet selectByUserId(@Param("userId") String userId);
    int addUserBanlance(Integer userId, BigDecimal amount);
    int reduceUserBalance(Integer userId,BigDecimal amount);
    List<UserWallet> selectAllWallet();
    void setAddress(int userId,String address);

}
